<include file="public@header"/>
<link rel="stylesheet" href="__ROOT__/static/layui/css/layui.css">
<script src="__ROOT__/static/layui/layui.js"></script>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('AdminMember/index')}">会员列表</a></li>
        <li  class="active"><a href="#">添加会员订单</a></li>
    </ul>
    <div style="width: 500px;">
        <form  class="layui-form layui-form-pane" action="{:url('AdminOrder/addPost')}" style="margin-top: 20px;">

            <input type="text" name="member_id" hidden value="{$member.id}" required  lay-verify="required" >
            <div class="layui-form-item">
                <label class="layui-form-label">编号</label>
                <div class="layui-input-block">
                    <input type="text" name="member_id" disabled value="{$member.id}" required  lay-verify="required" placeholder="" autocomplete="off" class="layui-input disabled">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">淘宝号</label>
                <div class="layui-input-block">
                    <input type="text" name="taobao_id" disabled value="{$member.taobao_id}" required  lay-verify="required" placeholder="" autocomplete="off" class="layui-input disabled">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">会员号</label>
                <div class="layui-input-block">
                    <input type="text" name="member_name" disabled value="{$member.member_name}"  required  lay-verify="required" placeholder="" autocomplete="off" class="layui-input disabled">
                </div>
            </div>

            <div class="layui-form-item" pane>
                <label class="layui-form-label">套餐名</label>
                <div class="layui-input-block">
                    <select name="pack_id" lay-verify="required">
                        <option value=""></option>
                        <volist name="pack" id="vo">
                            <option value="{$vo.id}">{$vo.pack_name}</option>
                        </volist>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">淘宝订单号</label>
                <div class="layui-input-block">
                    <input type="text" name="taobao_order_id" required  lay-verify="required" placeholder="请输入淘宝订单号" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">购买时间</label>
                <div class="layui-input-block">
                    <input type="text" id="buy_time" name="buy_time" required  lay-verify="required" placeholder="请输入淘宝订单号" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">订单地址</label>
                <div class="layui-input-block">
                    <input type="text" name="order_address" id="order_address" required  lay-verify="required" placeholder="请输入淘宝订单号" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    layui.use(['form','laydate'], function(){
        var form = layui.form;
        var laydate = layui.laydate;

        laydate.render({
            elem:'#buy_time'
        })
        //监听提交
//        form.on('submit(formDemo)', function(data){
//            layer.msg(JSON.stringify(data.field));
//            return false;
//        });
        form.on('checkbox(item_filter)', function(data){

//            console.log(data.elem); //得到checkbox原始DOM对象
//            console.log(data.elem.checked); //是否被选中，true或者false
//            console.log(data.value); //复选框value值，也可以通过data.elem.value得到
//            console.log(data.othis); //得到美化后的DOM对象
        });
    });
</script>
</body>
</html>